package uk.ac.ncl.carrent.tests;

import static org.junit.Assert.*;

import java.util.*;

import org.junit.Test;
import uk.ac.ncl.carrent.*;

public class PersonTest {

	@Test
	public void testPerson() {
		final String dob = "5/9/1987";
		final String[] parts = dob.split("/");
		final Person p = new Person("Shiwei", "He", dob);
		Calendar birth = new GregorianCalendar(Integer.parseInt(parts[0]),Integer.parseInt(parts[1]),Integer.parseInt(parts[2]));
		assertEquals("Shiwei", p.getFirstName());
		assertEquals("He", p.getLastName());
		assertEquals(birth, p.getDob());
	}

}
